﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CRMMaster.Master" AutoEventWireup="true" CodeBehind="CustomerContact.aspx.cs" Inherits="CRM.CustomerContacts.CustomerContact" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxTabControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxClasses" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <dx:ASPxPanel ID="ASPxPnlContact" runat="server" Height="661px" Width="795px">
        <PanelCollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                <dx:ASPxPageControl ID="ASPxPageControl1" runat="server" ActiveTabIndex="0" 
                    Height="668px" OnActiveTabChanged="ASPxPageControl1_ActiveTabChanged" 
                    Width="782px">
                    <TabPages>
                        <dx:TabPage Name="Create Contact" Text="Create Contact">
                            <ContentCollection>
                                <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                    <dx:ASPxPageControl ID="ASPxPageControl2" runat="server" ActiveTabIndex="1" 
                                        Height="494px" OnActiveTabChanged="ASPxPageControl2_ActiveTabChanged" 
                                        Width="732px">
                                        <TabPages>
                                            <dx:TabPage Name="Overview" Text="Overview">
                                                <ContentCollection>
                                                    <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblCustomerName" runat="server" Text="Customer Name"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:TextBox ID="txtCustomerName" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RfvCustomerName" runat="server" 
                                                            ErrorMessage="Customer Name is required!" 
                                                            ControlToValidate="txtCustomerName" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                        <br />
                                                        <br />
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblTitle" runat="server" Text="Title"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RfvTitle" runat="server" 
                                                            ErrorMessage="Title is required!" ControlToValidate="txtTitle" 
                                                            ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                        <br />
                                                        <br />
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblAccountName" runat="server" Text="Account Name"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:DropDownList ID="ddlAccountName" runat="server">
                                                            <asp:ListItem>Phyu Sin Htet</asp:ListItem>
                                                            <asp:ListItem>Su Hlaing Hnin</asp:ListItem>
                                                            <asp:ListItem>Khin Hsu Hsu Aung</asp:ListItem>
                                                            <asp:ListItem>Moe Thuta</asp:ListItem>
                                                            <asp:ListItem>Aung Ko Ko</asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator ID="RfvAcountName" runat="server" 
                                                            ErrorMessage="Account Name is required!" 
                                                            ControlToValidate="ddlAccountName" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                        <br />
                                                        <br />
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblOfficePhone" runat="server" Text="Office Phone"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:TextBox ID="txtOfficePhone" runat="server"></asp:TextBox>
                                                        <br />
                                                        <br />
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblMobile" runat="server" Text="Mobile"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:TextBox ID="txtMobile" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RfvMobile" runat="server" 
                                                            ErrorMessage="Mobile Phone No is required!" ControlToValidate="txtMobile" 
                                                            ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                        <br />
                                                        <br />
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblFax" runat="server" Text="Fax"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:TextBox ID="txtFax" runat="server"></asp:TextBox>
                                                        <br />
                                                        <br />
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblHomePhone" runat="server" Text="Home Phone"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:TextBox ID="txtHomePhone" runat="server"></asp:TextBox>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <br />
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblAssignedTo" runat="server" Text="Assigned To "></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:DropDownList ID="ddlAssignedTo" runat="server">
                                                            <asp:ListItem>Grace</asp:ListItem>
                                                            <asp:ListItem>Mary</asp:ListItem>
                                                            <asp:ListItem>Moe Thuta</asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator ID="RfvAssignedTo" runat="server" 
                                                            ErrorMessage="Assigned To cannot be empty!" 
                                                            ControlToValidate="ddlAssignedTo" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                        <br />
                                                        <br />
                                                        &nbsp;<asp:Label ID="lblEmail" runat="server" Text="Email"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
                                                        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RfvEmail" runat="server" 
                                                            ErrorMessage="Email is required!" ControlToValidate="txtEmail" 
                                                            ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                        <br />
                                                       
                                                    </dx:ContentControl>
                                                </ContentCollection>
                                            </dx:TabPage>
                                            <dx:TabPage Name="Address Information" Text="Address Information">
                                                <ContentCollection>
                                                    <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                                        <br />
                                                        <asp:Panel ID="pnlPrimaryAddress" runat="server" Height="427px"   Width="325px" 
                                                            style="margin-left: 15px; margin-top: 5px;" BackColor="#92DDF5" >
                                                            &nbsp;&nbsp;<br />
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:Label ID="lblPrimaryAddress" runat="server" Text="Primary Address" 
                                                                Font-Size="Large"></asp:Label>
                                                            <br />
                                                            <br />
                                                            <br />
                                                            &nbsp;<asp:Label ID="lblAddress" runat="server" Text="Address"></asp:Label>
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:TextBox ID="txtPrimaryAddress" runat="server"></asp:TextBox>
                                                            <br />
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:RequiredFieldValidator ID="RfvPrimaryAddress" runat="server" 
                                                                ErrorMessage="Address is required!" ControlToValidate="txtOtherAddress" 
                                                                ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                            <br />
                                                            <br />
                                                            &nbsp;<br />
                                                            &nbsp;&nbsp;
                                                            <asp:Label ID="lblCity" runat="server" Text="City"></asp:Label>
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:TextBox ID="txtPrimaryCity" runat="server"></asp:TextBox>
                                                            <br />
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:RequiredFieldValidator ID="RfvPrimaryCity" runat="server" 
                                                                ErrorMessage="City is required!" ControlToValidate="txtPrimaryCity" 
                                                                ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                            <br />
                                                            <br />
                                                            <br />
                                                            &nbsp;<asp:Label ID="lblState" runat="server" Text="State"></asp:Label>
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:TextBox ID="txtPrimaryState" runat="server"></asp:TextBox>
                                                            <br />
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:RequiredFieldValidator ID="RfvPrimaryState" runat="server" 
                                                                ErrorMessage="State is required!" ControlToValidate="txtPrimaryState" 
                                                                ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                            <br />
                                                            <br />
                                                            <br />
                                                            &nbsp;<asp:Label ID="lblPostalCode" runat="server" Text="Postal Code"></asp:Label>
                                                            &nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:TextBox ID="txtPrimaryPostal" runat="server"></asp:TextBox>
                                                            <br />
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:RequiredFieldValidator ID="RfvPrimaryPostalCode" 
                                                                runat="server" ErrorMessage="Postal Code is required!" 
                                                                ControlToValidate="txtPrimaryPostal" ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                            <br />
                                                            <br />
                                                            <br />
                                                            &nbsp;<asp:Label ID="lblCountry" runat="server" Text="Country"></asp:Label>
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:TextBox ID="txtPrimaryCountry" runat="server"></asp:TextBox>
                                                            <br />
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                            <asp:RequiredFieldValidator ID="RfvCountry" runat="server" 
                                                                ErrorMessage="Country is required!" ControlToValidate="txtPrimaryCountry" 
                                                                ForeColor="#FF3300"></asp:RequiredFieldValidator>
                                                            &nbsp;<asp:Panel ID="pnlOtherAddress" runat="server" 
                                                                style="margin-left: 370px; margin-top: -355px;" Height="427px"   
                                                                Width="307px" BackColor="#92DDF5" >
                                                                <br />
                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:Label runat="server" Text="Other Address" Font-Size="Large"></asp:Label>
                                                                <br />
                                                                <br />
                                                                <br />
                                                                &nbsp;<asp:Label ID="Label2" runat="server" Text="Address"></asp:Label>
                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:TextBox ID="txtOtherAddress" runat="server"></asp:TextBox>
                                                                <br />
                                                                <br />
                                                                <br />
                                                                &nbsp;<asp:Label ID="Label3" runat="server" Text="City"></asp:Label>
                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:TextBox ID="txtOtherCity" runat="server"></asp:TextBox>
                                                                <br />
                                                                <br />
                                                                <br />
                                                                &nbsp;<asp:Label ID="Label4" runat="server" Text="State"></asp:Label>
                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:TextBox ID="txtOtherState" runat="server"></asp:TextBox>
                                                                <br />
                                                                <br />
                                                                <br />
                                                                &nbsp;<asp:Label ID="Label5" runat="server" Text="Postal Code"></asp:Label>
                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:TextBox ID="txtOtherPostal" runat="server"></asp:TextBox>
                                                                <br />
                                                                <br />
                                                                <br />
                                                                &nbsp;<asp:Label ID="Label6" runat="server" Text="Country"></asp:Label>
                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                <asp:TextBox ID="txtOtherCountry" runat="server"></asp:TextBox>
                                                                &nbsp;</asp:Panel>
                                                        </asp:Panel>
                                                        <br />
                                                    </dx:ContentControl>
                                                </ContentCollection>
                                            </dx:TabPage>
                                        </TabPages>
                                    </dx:ASPxPageControl>


                                     <br />
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <br />
                                    <br />
                                                        <br />
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnCreate" runat="server" 
                                        OnClick="btnCreate_Click" Text="Create" />
                                    &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
                                                        <br />
                                                        <br />




                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Name="View Contact" Text="View Contact">
                            <ContentCollection>
                                <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                        DataSourceID="dsViewContact">
                                       
                                    </asp:GridView>
                                    <br />
                                    <br />
                                    <br />
                                    <asp:ObjectDataSource ID="dsViewContact" runat="server" 
                                        OldValuesParameterFormatString="original_{0}" 
                                        SelectMethod="viewCustomerContacts" 
                                        TypeName="CRM.Business_Object.CustomerContactObject"></asp:ObjectDataSource>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Name="Update Contact" Text="Update Contact">
                            <ContentCollection>
                                <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                    <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                                        AllowSorting="True" DataSourceID="dsUpdateContact">
                                        <Columns>
                                            <asp:CommandField ButtonType="Button" ShowEditButton="True" />
                                        </Columns>
                                    </asp:GridView>
                                    <br />
                                    <br />
                                    <br />
                                    <asp:ObjectDataSource ID="dsUpdateContact" runat="server" 
                                        DataObjectTypeName="CRM.Business_Object.CustomerContactObject" 
                                        SelectMethod="viewCustomerContacts" 
                                        TypeName="CRM.Business_Object.CustomerContactObject" 
                                        UpdateMethod="updateCustomerContacts"></asp:ObjectDataSource>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Name="Delete Contact" Text="Delete Contact">
                            <ContentCollection>
                                <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                    <asp:GridView ID="GridView3" runat="server" AllowPaging="True" 
                                        AllowSorting="True" DataSourceID="dsDeleteContact">
                                        <Columns>
                                            <asp:CommandField ButtonType="Button" ShowDeleteButton="True" />
                                        </Columns>
                                    </asp:GridView>
                                    <br />
                                    <asp:ObjectDataSource ID="dsDeleteContact" runat="server" 
                                        DataObjectTypeName="CRM.Business_Object.CustomerContactObject" 
                                        DeleteMethod="deleteCustomerContacts" 
                                        OldValuesParameterFormatString="original_{0}" 
                                        SelectMethod="viewCustomerContacts" 
                                        TypeName="CRM.Business_Object.CustomerContactObject" 
                                        UpdateMethod="updateCustomerContacts"></asp:ObjectDataSource>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                    </TabPages>
                    <ActiveTabStyle Cursor="default">
                    </ActiveTabStyle>
                </dx:ASPxPageControl>
            </dx:PanelContent>
        </PanelCollection>
    </dx:ASPxPanel>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
